package com.veepeak.server.domain;

import com.veepeak.server.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@DynamicUpdate@DynamicInsert
@Table(name = "vehicle")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString
public class Vehicle extends BaseEntity {
    private String licenseNo;
    private String vin;
    private String name; //车辆名称
    private String year; //车型年代
    @ManyToOne()
    @JoinColumn(name = "model_id")
    private VehicleModel model;

}
